Design and application of coal gangue sorting system based on deep learning

With the advancement of science and technology, coal-washing plants are transitioning to intelligent, information-based, and professional sorting systems. This shift accelerates the construction a modern economic system characterized by green and low-carbon development, thereby promoting the high-quality advancement of the coal industry. Traditional manual gangue picking and multi-axis robotic arm gangue selection currently suffer from low recognition accuracy, slow sorting efficiency, and high worker labor intensity. This paper proposes a deep learning-based, non-contact gangue recognition and pneumatic intelligent sorting system. The system constructs a dynamic database containing key feature information such as the target gangue's contour, quality, and center of mass. The system elucidates the relationships between ejection speed, mass, volume, angle of incidence, and the impact energy matching mechanism. Demonstration experiments using the system prototype for coal gangue sorting reveal that, compared to existing robotic arm sorting methods in coal washing plants, this system achieves a gangue identification accuracy exceeding 97%, a sorting rate above 91%, and a separation time of less than 3 s from identification to separation, thereby effectively enhancing raw coal purity.

γ-ray 12 , which distinguish coal from gangue based on radiation attenuation levels.Image-based gangue selection is trained and optimized using deep learning algorithms, enabling the identification of coal and gangue.A comprehensive comparison of the primary gangue selection methods mentioned above reveals their respective strengths and weaknesses, as summarized in Table 1.
In recent years, advancements in computer technology and deep learning image recognition, alongside improvements in high-definition camera performance and cost reduction, have made image sorting the mainstream technology for intelligent coal gangue sorting.Numerous scholars have conducted extensive research on intelligent sorting.Murad Saleh Alcarraza 13 trained a coal gangue recognition model based on CGR-CNN using thermal images of coal and coal gangue.Li et al. 14 proposed a deep learning-based hierarchical detection framework to identify coal gangue.Pengcheng Yan 15 proposed an intelligent classification method for coal gangue using multispectral imaging technology and object detection.This method achieved a static recognition accuracy of 98.34% by enhancing the YOLOv5 model structure.Lei Zhang 16 conducted coal gangue recognition by extracting grayscale and texture features from coal gangue images.However, there is a lack of multi-scene coal gangue datasets, the detection process is affected by noise and motion blur, image enhancement is required, and rapid sorting methods necessitate further research.The accuracy and efficiency of coal gangue recognition algorithms require further enhancement.Based on the aforementioned intelligent recognition methods, the primary sorting methods include pneumatic nozzles and multi-axis robotic arms.Yuan Huaxin 17 , Dou Dongyang 18 , and Zixiang Wang et al. 19 proposed a jet-type coal and gangue sorting device that utilizes a camera to obtain the postural information of coal and gangue and employs an array of pneumatic nozzles for sorting.Chenguang Yang 20 and Viljoen Jacob 21 used X-rays to identify coal and gangue, achieving separation with high-pressure nozzles.The aforementioned non-contact pneumatic sorting methods do not require additional media and are non-polluting.However, due to variations in the size and shape of the gangue on the conveyor belt, precise control of the number and intensity of air nozzles is necessary.Small air quantities fail to achieve complete separation of gangue, whereas large quantities can affect surrounding raw coal, leading to resource waste and complex control conditions.Liu Peng 22 , Wang Peng 23 , and Junhao Jiang 24 proposed a coal and gangue identification method based on image processing and multi-layer perceptrons and employed it to develop a coal and gangue sorting robot.Cao 25,26 and Hongwei Ma 27 proposed a global multi-manipulator multi-objective collaborative sorting system to address the issue of low sorting rates caused by limited space and poor coordination of single manipulators.Shang et al. 28,29 designed a coal gangue sorting system that integrates image processing with Delta parallel robots.Compared with serial robots, its sorting speed and efficiency are significantly improved.However, with the increase in coal mining volume and intensity, the size of gangue varies, the conveyor belt speed is high, and the transportation volume is substantial.It is challenging to use mechanical arms to achieve rapid and accurate separation of gangue on high-speed conveyor belts.
In conclusion, this paper presents a deep learning-based array aerodynamic ejection coal gangue sorting system.By incorporating belt speed information, dynamic information models for the position and status of coal gangue with particle sizes of 50-120 mm are obtained.Various sorting strategies for coal gangue of differing shapes and sizes in various positions are formulated.Additionally, a dynamic motion model for varying ejection velocities, masses, volumes, and impact angles of foreign objects is established.Furthermore, the relationship between the impact energy of ejection mechanisms and gangue size and posture matching is determined.Compared to sorting robots and pneumatic nozzles, the pneumatic sorting device proposed in this paper exhibits fast response times, low energy consumption, and high sorting reliability.

Design of coal gangue sorting system
The schematic diagram of the deep learning-based coal gangue sorting system is illustrated in Fig. 1.
The primary mechanical component of the equipment is a belt conveyor measuring 4.4 m in length, 1 m in width, and 2.3 m in height.The feeding port is 0.7 m long, the paving queuing module is 1.3 m long, the coal gangue identification module is 1.2 m long, the belt conveyor's height from the ground is 2.3 m, and a 1.3-m sorting space is reserved.
The workflow of the sorting system is depicted in Fig. 2.Where [N, (X, Y), T] is defined as follows: N denotes the number of middling coal gangue particles in the image, (X, Y) specifies the horizontal and vertical coordinates of the middling coal gangue in the image, and T indicates the recognition time of the coal gangue.

Hardware design
After passing through the leveling and queuing module, coal and coal gangue enter the coal gangue recognition module to undergo the process of capturing and identifying coal gangue.The coal gangue recognition module is primarily divided into two sections: the coal gangue image capturing section and the PC terminal image processing section.The coal gangue image capture section comprises a cubic darkroom equipped with an industrial-grade digital camera array and a highly uniform strip light source.The specific equipment parameters are detailed in Table 2.

Coal gangue recognition algorithm based on deep learning
This study applies transfer learning 30 to deep learning algorithms, selecting the ResNet-50 network, which demonstrated superior performance in HALCON software, as the coal gangue recognition module for the sorting system.The hyperparameter settings of the optimized coal gangue identification model trained on the ResNet-50 network are presented in Table 3. Figure 3. illustrates the performance of the top-performing coal  Framework for identifying coal gangue 2) Ethernet Communication: Process the X-axis coordinates, Y-axis coordinates, and processing time data of the identified coal gangue, and transmit the identification information packet to the sorting system controller via Ethernet.The data set is sent to the sorting system controller, as illustrated in Fig. 5. 3) Human-Computer Interaction Interface: The MERLIC Designer component in MERLIC software facilitates the creation of graphical user interfaces for machine vision applications, allowing for the insertion of controls through drag-and-drop interaction and the adjustment of layout and control properties as needed.
This study employs the MERLIC Designer component to develop a user-friendly human-computer interaction interface.The human-computer interaction interface primarily comprises three sections, as shown in Fig. 6.

Coal gangue sorting control system module
The comprehensive design framework of the sorting module control system is illustrated in Fig. 7.The coal gangue data packets are transmitted to the communication module of the sorting module control system via Ethernet.The communication module converts Ethernet data packets into serial port data packets and forwards them to the sorting module controller.The sorting module controller processes the received coal gangue identification data, regulates the corresponding cylinder actions, and completes the entire workflow of coal gangue identification and sorting.The sorting module controller adjusts the stepper motor's rotation according to the conveyor belt speed, ensuring precise impact of the coal gangue by the cylinder.

Hardware design of sorting system
The coal gangue sorting module primarily comprises guide rails, air sources, solenoid valves, cylinders, magnetic switches, stepper motors, and stepper motor controllers.The primary technical specifications are presented in Table 4. (1) The core circuit of the main control chip involves selecting the GD32F103RDT6 chip.The minimal system circuit includes a power supply circuit, clock circuit, reset circuit, SWD debugging circuit, etc.The circuit diagram is illustrated in Fig. 8.
(2) Communication module circuit.The identification data packets transmitted by the coal gangue recognition module are conveyed via Ethernet.The sorting controller must be equipped with compatible communication modules to receive the data packets.This study employs the CH9121 network serial communication chip to construct the communication module for the sorting control system, as illustrated in Fig. 9.
(3) The cylinder control circuit employs the XY60620A-02-B-N-300 mm two-position five-way dual electronic control solenoid valve to regulate the cylinder.Figure 10.illustrates the cylinder-driven circuit.The dual electronic control solenoid valve contains two coils: one for positive action and one for reverse action.
In the sorting system described herein, the cylinder's impact state is configured for positive action, with resetting set to reverse action.The SC32X150S model cylinder employed in this system incorporates a magnetic ring within the piston.Consequently, this system employs the CMSG-020 magnetic switch, which is compatible with the cylinder, to detect the position of the cylinder piston.The operational principle diagram of the magnetic switch is illustrated in Fig. 11.The load module depicted in the figure is designed as a step-down circuit.

Evaluate expressions Identification result processing
(4) The sorting mechanism of the cylinder control circuit should employ a stepper motor to adjust the distance between the cylinder and the belt conveyor according to the conveyor's belt speed.This adjustment ensures that the cylinder can accurately strike the falling coal gangue within the piston's stroke range.This study employs the SD-20504 digital stepper motor driver to operate the 56BYG250BN stepper motor.The input interface circuit is illustrated in Fig. 12.The input control signal utilizes a common anode interface configuration, and the driver port is equipped with an optocoupler, which operates effectively at low levels.For pulse signal input, when the   www.nature.com/scientificreports/optocoupler corresponding to the pulse input port of the driver conducts, the driver receives a pulse signal and advances the motor by one step.

Sorting system software design
During the coal gangue sorting experiment, the actual transportation capacity of the belt was constrained, and no instances of belt breakage or bulging were observed.This study employs the GD32F103RDT6 chip as the control unit, and the software design is implemented based on the hardware circuitry.
( workforce.In addition to ensuring the sorting efficiency, it also minimizes electrical energy consumption, indirectly reducing the combustion of standard coal.Consequently, this leads to a significant decrease in the emission of pollutants such as carbon dust, carbon dioxide (CO 2 ), sulfur dioxide (SO 2 ), and nitrogen oxides (NO x ), thereby effectively safeguarding the ecological environment.
Figure 14 illustrates the distance between the coal gangue and the photography area, the travel distance of the coal gangue on the belt conveyor, and the height from which the coal gangue falls.The formula for calculating the strike delay time is presented in Eq. ( 1).
The formula incorporates the time taken for the model to recognize images, the speed of the belt conveyor, gravitational acceleration, and fixed values of 40 cm and 63.5 cm.The dimensions of the coal gangue image are 1280 × 1280 pixels, with each pixel measuring 0.0667 cm.
(4) Stepper Motor Program Design.This study specifies a pulse frequency of 200 Hz, a duty cycle of 50%, and sets the excitation method to 200 steps per revolution.The circumference of the shaft gear on the stepper motor within the sorting system designed in this study is 8 cm.This indicates that when the motor completes one rotation, the sorting device moves linearly by 8 cm.The calculation formula for motor control is presented in Eqs.(2).
Figure 15 shows a schematic diagram of the sorting mechanism's impact distance.The figure depicts a fixed value of 120 cm, representing the current position of the stepper motor and the horizontal displacement during the coal gangue's descent.
In the formula, "s" denotes the linear distance the sorting device moves after one full rotation of the motor, and "m" denotes the number of pulses.

Experimental study on the complete machine of coal gangue sorting system
This study experimentally evaluates the coal gangue sorting system prototype at various belt speeds by feeding coal gangue and coal through the feeding port.After passing through the coal gangue identification and sorting modules, the prototype assesses the recognition and sorting performance of the coal flow with a gangue content of 30% at different belt speeds.The particle size of coal gangue utilized in the experiment ranges from 50 to 120 mm.Preliminary experiments indicate that an excessive particle size of coal gangue can result in insufficient cylinder force for effective separation, whereas a smaller particle size may cause the cylinder to fracture the gangue.Moreover, the particle size of coal gangue within the range of 50-120 mm is more suitable for the operational conditions of coal washing plants.The coal and coal gangue used in the experiment are illustrated in Fig. 16.The interface of the host computer used to identify the coal gangue during the dynamic experiment is shown in Fig. 17.
Figure 18 illustrates the cylinder striking the gangue during the experiment, causing it to fall.Before the gangue reaches the cutting position, the cylinder at the corresponding location moves in advance.The gangue passes through the cylinder's impact area and is struck.The gangue deviates from its original trajectory and falls into the waste bin.The cylinder then resets.The coal smoothly passes through the cylinder's impact area and then falls onto the conveyor.The cylinder is reset.Through multiple experiments, the identification and sorting data of the prototype for coal flow with 120 coal gangue samples, 280 coal samples, and 30% gangue content at different belt speeds are presented in Table 5.
According to Table 5, the prototype of the coal gangue sorting system achieves a recognition accuracy of over 97%, a recall rate exceeding 92%, and a sorting rate surpassing 91% within the belt speed range of 0.5-1 m/s.At a speed of 0.5 m/s, the sorting system prototype achieves its highest accuracy, recall, and sorting rates, with values of 99.2%, 98.3%, and 98.3%, respectively.This demonstrates an effective separation of coal gangue.In previous studies, the author has accomplished the recognition and sorting of coal gangue utilizing image processing and multi-layer perceptron techniques 24,31 .The method employs image processing combined with multi-layer perceptron to identify coal and gangue, followed by the use of a robotic arm for sorting.The experimental results indicate that the average recognition accuracy for coal gangue is 96.45%, while the average sorting rate is 90.76%.These results are derived from the average of multiple experiments.At a belt speed of 0.6 m/s, the detailed comparison of experimental data is presented in the Table 6.
The data in the table demonstrate that the coal gangue identification and sorting method employed in this study outperforms other methods and yields consistently positive results.
Regarding energy efficiency in the sorting system, this study employs a pneumatic cylinder to strike the gangue, thereby completing the sorting process.Compared to spray gun sorting and mechanical arm sorting 32,33 , this method offers several advantages.
Table 7 illustrates that different methods are employed for sorting coal gangue of varying sizes.When sorting coal gangue of similar sizes, the cylinder-type sorting method utilized in this study consumes less energy, involves a simpler process, and provides superior application benefits.

Conclusion
Addressing the issues of low recognition accuracy, inefficiency, and resource wastage inherent in traditional coal selection technologies at coal washing plants, a pneumatic intelligent coal gangue sorting system based on deep learning is proposed.This system effectively enhances the inclusion rate of raw coal.The main conclusions of this study are as follows: (1) Based on the practical application scenarios of coal washing plants, a coal gangue sorting system capable of accurately identifying and sorting coal gangue with particle sizes ranging from 50 to 120 mm is proposed.The hardware selection and software design for the relevant modules, including the belt conveyor module, paving and queuing module, coal gangue identification module, and coal gangue sorting module, have been completed.(2) To address the low accuracy in coal and gangue recognition and poor positioning precision, this study employs the ResNet-50 network model, which demonstrates optimal performance within the HALCON software, as the gangue recognition module.Compared to most algorithms, this model exhibits higher accuracy and superior dynamic adaptability for coal gangue recognition, achieving recognition accuracy exceeding 97% within a belt running speed range of 0.5 to 1.0 m/s.(3) To address the inefficiencies and high energy consumption of existing gangue selection technologies, a pneumatic ejection sorting device based on multi-objective dynamic identification was developed.Compared to technologies such as multi-axis mechanical grippers and dense medium gangue separation, this system achieves a coal and gangue sorting rate exceeding 91%, with lower production costs, reduced energy consumption, and a separation completion time of less than 3 s.(4) Utilizing the designed prototype platform of the coal gangue separation system, experiments were conducted on coal flow containing 30% gangue.The results indicate that, compared to existing coal gangue separation technologies, this system simplifies the process flow, significantly improves the coal gangue sorting rate, and features lower energy consumption and response time.

1 )
Development of an application framework for coal gangue identification.The comprehensive application framework of the coal gangue recognition model based on MERLIC is illustrated in Fig. 4. It primarily consists of a speed input function module, a delay execution function module, an image source function module, an image size adjustment function module, a search object function module, a recognition result processing function module, and an Ethernet communication function module.The general workflow involves setting the photography interval based on the speed of the belt conveyor, inputting the captured images of coal and gangue into the recognition model, and subsequently transmitting the identified coal gangue information to the sorting module via Ethernet using a custom communication protocol.

Figure 11 .
Figure 11.Working principle diagram of magnetic switch.

Figure 17 .
Figure 17.Dynamic experiment host computer recognition interface.

Table 1 .
Comparison of the advantages and disadvantages of gangue selection methods.

Table 2 .
Main technical parameters of some equipment in the coal gangue identification module.

Table 3 .
Optimal performance ResNet-50 network model hyperparameter settings.ganguerecognition model on various images from the test set.In the figure, the red detection box indicates the detected coal, whereas the purple detection box signifies the detected coal gangue.If coal and gangue blocks are fused, the system determines the classification based on the proportion of gangue present on the coal block as captured by the camera image.If the proportion of gangue within a coal block exceeds 50%, it is typically classified as gangue.

Table 4 .
Main technical parameters of some components of the coal gangue mold sorting module.

Table 7 .
Comparison of energy consumption.